<template>
    <div class="meeting_live">
        
        <van-row>
            <van-col span="24">
                <van-sticky>
                    <LiveVideo v-if="live.previewPicture" :live="live"></LiveVideo>
                </van-sticky>
            </van-col>
            <van-col span="24">
                <van-cell :title="live.topic" value="内容" />
            </van-col>
            <van-col span="24">
                <van-tabs swipeable>
                    <van-tab title="内容介绍" name="c">
                        
                    </van-tab>
                    <van-tab title="留言互动" name="a">
                        <LiveIm></LiveIm>
                    </van-tab>
                </van-tabs>
            </van-col>
        </van-row>
        <van-action-sheet v-model:show="showCollectMsgForm" title="知情同意">
            <LiveAmis v-if="collectForm" :amis-json="collectForm"></LiveAmis>
        </van-action-sheet>

    </div>
</template>

<script setup>
    import { ref, computed, onMounted, inject } from 'vue'
    import { useRoute } from 'vue-router'
    import LiveAmis from "./components/live-amis.vue"
    import LiveVideo from "./components/live-video.vue"
    // import PlayerMobile from "./components/live-player/stream/index-mobile.vue"
    // import LiveIm from './components/live-im.vue'
    const $isMobile = inject('$isMobile')

    const api = inject('api')
    const route = useRoute()
    const detail = ref({})
    const showCollectMsgForm = ref(false)
    const live = computed(() => detail.value.live || {})
    const collectForm = computed(() => detail.value.collectForm || null)

    // 获取会议详情
    const getDetail = async () => {
        const res = await api.meetingDetail(route.params.id)
        if (!res.code) {
            detail.value = res.data
        }
    }

    

    onMounted(() => {
        
        getDetail()
    })
</script>

<style scoped>
</style>